// key in obj 检查 key 是否在obj或其原型链上

// 检测对象, 检测key
const car = { make: 'Honda', model: 'Accord', year: 1998 };
console.log('make' in car) // true
console.log('toString' in {}) // true，toString 是原型属性

// 检测数组, 检测key(index)
var trees = new Array("redwood", "bay", "cedar", "oak", "maple");
console.log(0 in trees) // true
console.log('redwood' in trees) // false
console.log(Symbol.iterator in trees) // true 数组有迭代器属性
